<template>
	<view class="content">
		<view class="tabBar">
			<view class="tabBarBox" v-for="(item,index) in tabBarBox" :key="index" @tap="thisBar(index,item.name,item.url)">
				<img class="thisIcons" :src="item.icon" alt="" v-if="item.selectIcon == ''">
				<img class="thisIcons" :src="item.selectIcon" alt="" v-if="item.selectIcon">
				<view class="name fontSize12" :style="{color:item.color}">{{item.name}}</view>
			</view>
		</view>
		
		
		
		
	</view>
</template>
<style>
	.content .tabBar{width:100%;height:120upx;background: white;border-top: 2upx solid rgba(113, 123, 136,0.5);position: fixed;left: 0;bottom:0;z-index: 3;display: flex;justify-content: space-around}
	.content .tabBar .tabBarBox{width: auto;height: 100upx;}
	.content .tabBar .tabBarBox .thisIcons{width: 48upx;margin-left:10upx;height:48upx;margin-top:10upx;}
	.content .tabBar .tabBarBox .name{width: 68upx;height:auto;text-align: center;color:rgba(113, 123, 136,1)}
</style>
<script>
	export default {
		props: {
			tabBarBox: {
				type: Array,
				default: ''
			},
		},
		data() {
			return {
				// tabBarBox:[
				// 	{icon:"static/image/index/icon_2.png",selectIcon:"static/image/index/icon_1.png",name:"首页",color:"#6E2C22"},
				// 	{icon:"static/image/index/icon_2.png",selectIcon:"static/image/index/icon_1.png",name:"课程",color:""},
				// 	{icon:"static/image/index/icon_2.png",selectIcon:"static/image/index/icon_1.png",name:"消息",color:""},
				// 	{icon:"static/image/index/icon_2.png",selectIcon:"static/image/index/icon_1.png",name:"我的",color:""},
				// ],
				
				
				
			}
		},
		onLoad(){
			
		},
		methods: {
			thisBar( index,name,url ){
				// uni.navigateTo({
				// 	url:url
				// })
				uni.reLaunch({
					url:url
				})
				// uni.switchTab({
				// 	url:url
				// })
			},
			
			
			
		}
	}
</script>
<style lang="scss" scoped>
/deep/ .uni-input-input {font-size:32upx}
/deep/ .uni-radio-input-checked{background-color:rgb(110,43,34) !important;border:2upx solid white !important}
.content .html{
  ::v-deep {
    img {
      width: 100%;
    }
  }
}
</style>